﻿#define _CRT_SECURE_NO_WARNINGS 
​
#include"Contact.h"
void menu()
{
	printf("********1.add     2.del*********\n");
	printf("********3.search  4.modify******\n");
	printf("********5.show    6.sort********\n");
	printf("********7.empty   0.exit********\n");
	printf("********************************\n");
}
int main()
{
	Contact con;
	InitContact(&con);
	int input = 0;
	do
	{
		menu();
		printf("请输入数字:>");
		scanf("%d", &input);
		switch (input)
		{
		case 1:
			AddContact(&con);
			break;
		case 2:
			DelContact(&con);
			break;
		case 3:
			SearchContact(&con);
			break;
		case 4:
			ModifyContact(&con);
			break;
		case 5:
			ShowContact(&con);
			break;
		case 6:
			SortContact(&con);
			break;
		case 7:
			EmptyContact(&con);
			break;
		case 0:
			printf("退出");
			break;
		default:
			printf("输入错误");
			break;
		}
	} while (input);

	return 0;
}

​